package Example3;

public class TicTacToe {
	
	private char[][] board;
	
	public TicTacToe(){
		this.board = new char[3][3];
	}
	
	public boolean areAllFieldsTaken(){
		boolean areFiledsTaken = true;
		
		for(int i =0; i<3; i++){
			for(int j = 0; j <3; j++){
				char ch = this.board[i][j];
				if(ch != 'o' && ch != 'x'){
					areFiledsTaken = false;
					break;
				}
			}
		}
		
		return areFiledsTaken;
	}

	public void setBoard(char[][] board) {
		this.board = board;
	}

	public char[][] getBoard() {
		return board;
	}

}
